const sequelize = require('sequelize')
const db = require('@/database')
const ScreeningTimes = db.define('aa_screening_times', {
    id: {
        type: sequelize.INTEGER,
        primaryKey: true,//主键
        autoIncrement: true,//自动增长
        allowNull: false,//不允许为空
        field: 'id',
        comment: '主键,场次ID'
    },
    auditorium_id: {
        type: sequelize.INTEGER(),
        allowNull: false,
        field: 'auditorium_id',
        comment: '放映厅id'
    },
    movie_id: {
        type: sequelize.INTEGER(),
        allowNull: false,
        field: 'movie_id',
        comment: '电影id'
    },
    show_time: {
        type: sequelize.STRING(),
        allowNull: false,
        field: 'show_time',
        comment: '放映时间'
    },
    fare: {
        type: sequelize.DOUBLE(),
        allowNull: false,
        field: 'fare',
        comment: '票价'
    },
    is_delete: {
        type: sequelize.BOOLEAN(),
        field: 'is_delete',
        comment: '是否删除',
        defaultValue: false,
        allowNull: false
    }
}, { timestamps: true, updatedAt: false });

//抛出模型
module.exports = ScreeningTimes